package com.bing.bean.Tpp.tuling;

import com.bing.bean.weixin.RequestMessage;
import com.bing.bean.weixin.ResponseMessage;
import com.bing.services.MsgTransfer;
import com.bing.utils.MsgHelper;

/**
 * Created by Administrator on 2015/6/6.
 */
public class Text implements MsgTransfer {

    private int code;
    private String text;

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("Text{");
        sb.append("code=").append(code);
        sb.append(", text='").append(text).append('\'');
        sb.append('}');
        return sb.toString();
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    @Override
    public ResponseMessage toMsg(RequestMessage requestMessage) {
        return MsgHelper.toText(requestMessage, text);
    }
}
